package mx.netbrain.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

import mx.netbrain.model.Install;
import mx.netbrain.util.HibernateUtil;

public class InstallDao extends HibernateUtil {

	private SessionFactory sf = HibernateUtil.getSessionFactory();
	private Transaction t = null;

	public Install findById(int id) {
		Session session = sf.openSession();
		t = session.beginTransaction();
		Install install = (Install) session.load(Install.class, id);
		t.commit();
		return install;
	}
}
